package com.pipayshop.domain;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import javax.validation.constraints.NotNull;

import java.io.Serializable;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @TableName shop_category
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("shop_category")
public class ShopCategory implements Serializable {

    /**
     * 商品类别id
     */
    @NotNull(message = "[商品类别id ]不能为空")
    @ApiModelProperty("商品类别id ")
    @TableId(type = IdType.AUTO)
    private Integer categoryId;
    /**
     * 种类内容
     */
    @Size(max = 100, message = "编码长度不能超过100")
    @ApiModelProperty("种类内容")
    @Length(max = 100, message = "编码长度不能超过100")
    private String content;
    /**
     * 该分类的父级id
     */
    @NotNull(message = "[该分类的父级id]不能为空")
    @ApiModelProperty("该分类的父级id")
    private Integer categoryPid;
    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 0:启用1:禁用
     */
    @NotNull(message = "[0:启用1:禁用]不能为空")
    @ApiModelProperty("0:启用1:禁用")
    private int delFlag;


    /**
     * 分类图片
     */
    @ApiModelProperty("分类图片")
    private String imgUrl;

    @ApiModelProperty("图片地址")
    private String originPath;


}
